RGBForeColor
RGBForeColor
Set foreground color to best match for current device #include <Quickdraw.h> Color Quickdraw
RGBColor *RGBColor ; requested red, green, blue components RGBForeColor sets the foreground color to the closest match it can find for the current device.
RGBColor is a record type that specifies a color's red, green, and blue components as 16-bit unsigned integers.
Notes: This sets the foreground color to the closest match for the current device.
However, neither PlotCIcon nor any of the new color patterns are affected. Before calling CopyBits with a pixMap as the source, set the foreground to black.
Whatever RGB you choose will go into an rgbFgColor field if your current port is a cGrafPort. This procedure will also place the pixel value closest to
that color in the fgColor field.
For old-style GrafPort's, the Quickdraw fgColor will be manufactured from the high bit of each of the red, green, and blue components. The
resulting 3-bit number is used to pick one of the original 8 colors available
to Quickdraw as follows:
Value Color Red Green Blue
0 black 0x0000 0x0000 0x0000
1 yellow 0xFC00 0xF37D 0x052F
2 magenta 0xF2D7 0x0856 0x84EC
3 red 0xDD6B 0x08C2 0x06A2
4 cyan 0x0241 0xAB54 0xEAFF
5 green 0x0000 0x8000 0x11B0
6 blue 0x0000 0x0000 0xD400
7 white 0xFFFF 0xFFFF 0xFFFF